﻿/* 原有聊天页面样式完全保留 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.home-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    min-height: 100vh;
    min-width: 100vw;
    justify-content: center;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    background-size: cover;
    padding: 20px;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
}


/*WebSocket相关变量*/
/* 添加连接状态样式 */
.connection-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    margin: 15px 0;
}

.status-connected .status-dot {
    background-color: #2ecc71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.6);
}

.status-connecting .status-dot {
    background-color: #f39c12;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.connection-buttons button {
    padding: 8px 5px;
    margin-left: 10px;
    border: none;
    border-radius: 5px;
    background: #3498db;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

    .connection-buttons button:hover {
        background: #2980b9;
        transform: translateY(-2px);
    }

    .connection-buttons button:disabled {
        background: #7f8c8d;
        cursor: not-allowed;
        transform: none;
    }



.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
}

.header {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .header h1 {
        color: white;
        font-weight: 600;
        font-size: 2.2rem;
        letter-spacing: 1px;
        margin-bottom: 5px;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .header p {
        color: #a0a0ff;
        font-size: 1.1rem;
    }

.chat-container {
    display: flex;
    height: 70vh;
    width: 100%;
    overflow-y: auto;
}

/* 左侧图片上传区 */
.image-upload-side {
    width: 200px;
    min-width: 200px;
    background: rgba(0, 10, 30, 0.7);
    padding: 25px 10px 25px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 0;
}

.file-upload-side button {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: #fff;
    color: #2196F3;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    margin-bottom: 18px;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.10);
    transition: all 0.3s;
}

    .file-upload-side button:hover {
        background: #e3f2fd;
        color: #1565c0;
    }

.image-preview-list-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.image-preview-card-side {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.10);
    border-radius: 12px;
    padding: 8px 10px 8px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    min-width: 120px;
    max-width: 180px;
}

.image-thumb-side img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    border: 1px solid #eee;
}

.image-name-side {
    flex: 1;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
}

.remove-image-btn-side {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 2px;
    transition: color 0.2s;
}

    .remove-image-btn-side:hover {
        color: #ff2e2e;
    }
/* 聊天消息区自适应宽度 */
.chat-history {
    flex: 1;
    min-width: 0;
    padding: 20px;
    overflow-y: auto;
    background: rgba(10, 15, 35, 0.6);
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    min-width: 100px; /* 添加最小宽度 */
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 18px;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    word-break: break-word; /* 确保长单词换行 */
    overflow-wrap: break-word; /* 确保文本不会溢出 */
}

.message-content {
    white-space: pre-wrap; /* 保留换行符和空格 */
    word-break: break-word; /* 确保长单词换行 */
    text-align: left;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message {
    background: rgba(25, 118, 210, 0.25);
    border: 1px solid rgba(100, 181, 246, 0.3);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    color: #e3f2fd;
}

.user-message {
    background: rgba(56, 142, 60, 0.25);
    border: 1px solid rgba(102, 187, 106, 0.3);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    color: #e8f5e9;
}

.message img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: contain;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 调整输入区域布局 */
.input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    width: 100%;
    background: none;
}

.input-left-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-right: 12px;
}

.switch-area-input {
    margin-right: 12px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.switch-label {
    color: #86d0da;
    font-size: 0.9rem;
}

.file-upload-input button {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fff;
    color: #2196F3;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 114, 255, 0.10);
    transition: all 0.3s;
}

    .file-upload-input button:hover {
        background: #e3f2fd;
        color: #1565c0;
    }

.text-input {
    flex: 1;
    position: relative;
    min-width: 200px; /* 防止挤压 */
}

    .text-input textarea {
        width: 100%;
        background: rgba(20, 30, 60, 0.7);
        border: 1px solid rgba(100, 181, 246, 0.3);
        border-radius: 25px;
        padding: 15px 70px 15px 20px;
        color: white;
        font-size: 1.1rem;
        resize: none;
        outline: none;
        min-height: 60px;
        max-height: 200px;
        transition: all 0.3s ease;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
    }

        .text-input textarea:focus {
            border-color: #64b5f6;
            box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.3);
        }

        .text-input textarea::-webkit-scrollbar {
            width: 8px;
        }

        .text-input textarea::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 4px;
        }

        .text-input textarea::-webkit-scrollbar-thumb {
            background-color: rgba(100, 181, 246, 0.5);
            border-radius: 4px;
            border: 2px solid transparent;
        }

            .text-input textarea::-webkit-scrollbar-thumb:hover {
                background-color: rgba(100, 181, 246, 0.7);
            }


/* 发送按钮状态样式 */
.send-btn {
    cursor: pointer;
    transition: all 0.3s ease;
}

    .send-btn[disabled] {
        cursor: pointer;
        opacity: 0.7;
    }

    .send-btn.sending {
        background-color: #ccc;
    }
/*聊天页面加载器*/
.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.file-upload button i, .send-btn i {
    transition: transform 0.2s ease;
}

.file-upload button:hover i {
    transform: scale(1.1);
}

.send-btn:hover i {
    transform: rotate(-15deg) scale(1.1);
}

.file-upload {
    position: relative;
}

    .file-upload input {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    .file-upload button, .send-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #00c6ff, #0072ff);
        color: white;
        border: none;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.3rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 10px rgba(0, 114, 255, 0.4);
    }

        .file-upload button:hover, .send-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(0, 114, 255, 0.6);
        }

        .file-upload button:active, .send-btn:active {
            transform: translateY(1px);
        }

.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 10px 15px;
    background: rgba(25, 118, 210, 0.25);
    border-radius: 20px;
    color: #bbdefb;
    font-size: 0.9rem;
}

.typing-dots {
    display: flex;
    margin-left: 8px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #64b5f6;
    border-radius: 50%;
    margin: 0 3px;
    animation: typing 1.4s infinite;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.2s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.4s;
    }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-5px);
    }
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: #bbdefb;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-icon {
    color: #4fc3f7;
}

.file-preview {
    display: flex;
    align-items: center;
    background: rgba(25, 118, 210, 0.2);
    border-radius: 15px;
    padding: 5px 12px;
    margin-right: 10px;
    animation: fadeIn 0.3s ease-out;
    max-width: 200px;
}

.file-name {
    font-size: 0.85rem;
    color: #bbdefb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-file {
    background: transparent;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

    .remove-file:hover {
        transform: scale(1.1);
    }

/* 仅保留必要的小屏幕布局调整 */
@media (max-width: 1023px) {
    .chat-container {
        flex-direction: column;
        height: 70vh;
        min-height: 1000px;
        overflow-y: auto;
    }

    .container {
        /*             width: 100%; */
    }
}

/* 添加全局过渡效果，使尺寸变化更平滑 */
* {
    transition: all 0.3s ease;
}

/* 以下是新增页面样式 */
.app-container {
    display: flex;
    min-height: 60vh;
    width: 80%;
    overflow-y: auto;
}

.side-select {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    background: linear-gradient(to bottom, #1a2a6c, #2a4d69);
    color: white;
    padding: 20px 0;
    box-shadow: 3px 0 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

    .sidebar-header h2 {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        font-weight: 600;
        font-size: 1.4rem;
    }

    .sidebar-header i {
        color: #4dccbd;
        font-size: 1.8rem;
    }

.nav-items {
    padding: 20px 0;
    flex: 1;
}

.nav-item {
    padding: 14px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    margin: 5px 0;
}

    .nav-item i {
        width: 24px;
        text-align: center;
        font-size: 1.2rem;
    }

    .nav-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-item.active {
        background-color: rgba(255, 255, 255, 0.15);
        border-left: 4px solid #4dccbd;
        font-weight: 600;
    }

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.logout-btn {
    width: 50%;
    padding: 10px;
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

    .logout-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0, 114, 255, 0.6);
    }

    .logout-btn:disabled {
        background: #6c757d;
        cursor: not-allowed;
    }

.model-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

    .model-info i {
        color: #4dccbd;
    }

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

    .status-dot.connected {
        background-color: #4dccbd;
        box-shadow: 0 0 8px rgba(77, 204, 189, 0.6);
    }

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.1);
}

/* 增量学习页面样式 */
.incremental-page {
    /* 移除 max-width、margin、background、backdrop-filter、border-radius、overflow、box-shadow、border 等重复样式 */
    /* 只保留内容布局相关样式 */
}

.page-header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .page-header h1 {
        font-size: 2.2rem;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .page-header p {
        font-size: 1.1rem;
        opacity: 0.9;
        color: #a0a0ff;
    }

.incremental-container {
    display: flex;
    gap: 30px;
    padding: 30px;
    width: 100%;
}

.info-card {
    flex: 1;
    background: rgba(0, 10, 30, 0.7);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.card-icon {
    font-size: 36px;
    color: #4dccbd;
    margin-bottom: 15px;
    text-align: center;
}

.card-content h3 {
    margin-top: 0;
    color: #4fc3f7;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.card-content p {
    color: #bbdefb;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-content ul {
    padding-left: 20px;
    margin-top: 15px;
}

.card-content li {
    margin-bottom: 10px;
    color: #bbdefb;
    position: relative;
}

    .card-content li:before {
        content: "•";
        color: #4dccbd;
        position: absolute;
        left: -20px;
    }

.incremental-form {
    flex: 2;
    background: rgba(0, 10, 30, 0.7);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

    .incremental-form h2 {
        margin-top: 0;
        color: #4fc3f7;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 25px;
        font-size: 1.8rem;
    }

.form-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.2);
}

    .form-section h3 {
        margin-top: 0;
        color: #4fc3f7;
        font-size: 1.2rem;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.image-upload-area {
    height: 200px;
    border: 2px dashed rgba(100, 181, 246, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    overflow: hidden;
    background: rgba(20, 30, 60, 0.4);
}

    .image-upload-area:hover {
        border-color: #4dccbd;
        background: rgba(20, 40, 80, 0.5);
    }

.upload-prompt {
    text-align: center;
    color: #bbdefb;
}

    .upload-prompt i {
        font-size: 48px;
        color: rgba(100, 181, 246, 0.6);
        margin-bottom: 15px;
    }

.uploaded-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.remove-btn {
    margin-top: 10px;
    background: rgba(25, 118, 210, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bbdefb;
}

    .remove-btn:hover {
        background: rgba(25, 118, 210, 0.3);
    }

textarea {
    width: 100%;
    background: rgba(20, 30, 60, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s;
    min-height: 100px;
}

    textarea:focus {
        outline: none;
        border-color: #64b5f6;
        box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.3);
    }

.category-selector {
    display: flex;
    gap: 15px;
}

select, input[type="text"] {
    padding: 12px;
    background: rgba(20, 30, 60, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    width: 100%;
    color: white;
}

    select:focus, input[type="text"]:focus {
        border-color: #64b5f6;
        box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.3);
        outline: none;
    }

.new-category-input {
    flex: 1;
}

.training-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.param-item {
    display: flex;
    flex-direction: column;
}

    .param-item label {
        margin-bottom: 8px;
        font-weight: 500;
        color: #bbdefb;
    }

    .param-item input[type="range"] {
        width: 100%;
        background: rgba(20, 30, 60, 0.7);
    }

    .param-item input[type="number"] {
        padding: 10px;
        background: rgba(20, 30, 60, 0.7);
        border: 1px solid rgba(100, 181, 246, 0.3);
        border-radius: 12px;
        color: white;
    }

    .param-item span {
        margin-top: 5px;
        font-size: 14px;
        color: #bbdefb;
    }

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.submit-btn, .reset-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.submit-btn {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 114, 255, 0.4);
}

    .submit-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 114, 255, 0.6);
    }

    .submit-btn:disabled {
        background: #6c757d;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.reset-btn {
    background: rgba(20, 30, 60, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #bbdefb;
}

    .reset-btn:hover {
        background: rgba(30, 40, 70, 0.8);
    }

/* 新增历史会话页面样式 */
.history-page {
    /* 移除 max-width、margin、background、backdrop-filter、border-radius、overflow、box-shadow、border 等重复样式 */
    /* 只保留内容布局相关样式 */
}

.history-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
}

.history-controls {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    position: relative;
    /* width: 300px; 删除这一行，让搜索框自适应宽度 */
}

    .search-box input {
        width: 100%;
        padding: 10px 15px 10px 40px;
        background: rgba(20, 30, 60, 0.7);
        border: 1px solid rgba(100, 181, 246, 0.3);
        border-radius: 25px;
        color: white;
        font-size: 1rem;
        outline: none;
    }

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #bbdefb;
    }

.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}


.refresh-btn {
    padding: 10px 15px;
    background: rgba(25, 118, 210, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 25px;
    color: #bbdefb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    width: 120px;
}


    .refresh-btn:hover {
        background: rgba(25, 118, 210, 0.3);
    }

.history-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(10, 15, 35, 0.6);
    padding: 15px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: #bbdefb;
    opacity: 0.7;
}

    .empty-state i {
        font-size: 48px;
        margin-bottom: 20px;
    }

.history-item {
    background: rgba(20, 30, 60, 0.5);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

    .history-item:hover {
        background: rgba(25, 118, 210, 0.2);
    }

    .history-item.active {
        background: rgba(25, 118, 210, 0.3);
        border-left: 4px solid #4dccbd;
    }

.session-preview {
    margin-bottom: 10px;
}

.session-title {
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
}

.session-snippet {
    color: #bbdefb;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #bbdefb;
}

.session-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: transparent;
    border: none;
    color: #bbdefb;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .action-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

.restore-btn:hover {
    color: #4dccbd;
}

.delete-btn:hover {
    color: #ff6b6b;
}

.session-detail {
    min-width: 74%;
    background: rgba(10, 15, 35, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    overflow-y: auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .detail-header h3 {
        color: white;
        margin: 0;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.session-date {
    font-size: 0.9rem;
    color: #bbdefb;
}

.close-detail {
    background: transparent;
    border: none;
    color: #bbdefb;
    cursor: pointer;
    font-size: 1.2rem;
}

.detail-content {
    margin-bottom: 20px;
}

.history-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease-out;
}

.user-message {
    background: rgba(56, 142, 60, 0.15);
    border: 1px solid rgba(102, 187, 106, 0.2);
    color: #e8f5e9;
}

.ai-message {
    background: rgba(25, 118, 210, 0.15);
    border: 1px solid rgba(100, 181, 246, 0.2);
    color: #e3f2fd;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.message-content {
    white-space: pre-wrap;
    word-break: break-word;
}

.history-message img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .detail-actions .action-btn {
        flex: 1;
        border-radius: 25px;
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

.action-btn.primary {
    background: rgba(25, 118, 210, 0.3);
    border: 1px solid rgba(100, 181, 246, 0.3);
}

    .action-btn.primary:hover {
        background: rgba(25, 118, 210, 0.5);
    }

.action-btn.danger {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

    .action-btn.danger:hover {
        background: rgba(220, 53, 69, 0.3);
    }

/* 模态对话框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirm-modal {
    background: rgba(20, 30, 60, 0.95);
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(100, 181, 246, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        color: white;
    }

.close-modal {
    background: transparent;
    border: none;
    color: #bbdefb;
    cursor: pointer;
    font-size: 1.2rem;
}

.modal-body {
    padding: 20px;
    color: #bbdefb;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-btn, .confirm-btn {
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background: rgba(20, 30, 60, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #bbdefb;
}

    .cancel-btn:hover {
        background: rgba(30, 40, 70, 0.8);
    }

.confirm-btn.danger {
    background: rgba(220, 53, 69, 0.7);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: white;
}

    .confirm-btn.danger:hover {
        background: rgba(220, 53, 69, 0.8);
    }

/* 响应式调整 */
@media (max-width: 1024px) {
    .history-container {
        flex-direction: column;
        height: auto;
    }

    .session-detail {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .search-box {
        width: 100%;
    }

    .filter-controls {
        flex-direction: column;
    }
}

.search-controls-container {
    display: flex;
    justify-content: center;
    width: 20%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.recognition-page .search-controls-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-controls {
    width: 100%;
    /* max-width: 800px; 删除这一行，让搜索控制区域自适应宽度 */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-content {
    display: flex;
    height: 100%;
    width: 80%;
    min-height: 500px;
}

.history-list-container {
    flex: 1;
    overflow-y: auto;
    min-width: 26%; /* 添加最小宽度 */
    padding: 20px;
    background: rgba(10, 15, 35, 0.6);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
}

/* 修改搜索框样式 */
.search-box {
    position: relative;
    width: 100%;
}

    .search-box input {
        width: 100%;
        padding: 12px 15px 12px 40px;
        background: rgba(20, 30, 60, 0.7);
        border: 1px solid rgba(100, 181, 246, 0.3);
        border-radius: 25px;
        color: white;
        font-size: 1rem;
        outline: none;
        transition: all 0.3s;
    }

        .search-box input:focus {
            border-color: #4dccbd;
            box-shadow: 0 0 0 2px rgba(77, 204, 189, 0.3);
        }

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #bbdefb;
    }

/* 修改筛选控制区域样式 */
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

    .filter-controls select {
        padding: 10px 15px; /* 调整内边距 */
        background: rgba(20, 30, 60, 0.7); /* 保持与按钮一致的背景 */
        border: 1px solid rgba(100, 181, 246, 0.3); /* 保持与按钮一致的边框 */
        border-radius: 25px; /* 保持与按钮一致的圆角 */
        color: white; /* 统一文本颜色 */
        outline: none;
        width: 120px;
        height: 45px; /* 统一高度 */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 统一阴影 */
        transition: all 0.3s ease;
        -webkit-appearance: none; /* 移除默认下拉箭头 */
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center; /* 定位自定义箭头 */
        background-size: 16px;
        text-align: left; /* 文本左对齐，为箭头留出空间 */
        padding-right: 35px; /* 确保为自定义箭头留出足够的空间 */
        white-space: nowrap; /* 防止文本换行 */
    }

        .filter-controls select:hover {
            background: rgba(25, 118, 210, 0.3); /* 统一 hover 背景 */
            border-color: #4dccbd; /* 统一 hover 边框颜色 */
        }

        .filter-controls select:focus {
            border-color: #64b5f6;
            box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.3);
        }


.refresh-btn {
    padding: 10px 15px;
    background: rgba(25, 118, 210, 0.2);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 25px;
    color: #bbdefb;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    width: 120px;
}


    .refresh-btn:hover {
        background: rgba(25, 118, 210, 0.3);
    }

/* 新增模式切换按钮样式 */
.mode-toggle-btn {
    background: rgba(20, 30, 60, 0.7); /* 保持与下拉框一致的背景 */
    border: 1px solid rgba(100, 181, 246, 0.3); /* 保持与下拉框一致的边框 */
    border-radius: 25px; /* 保持与下拉框一致的圆角 */
    padding: 10px 15px; /* 保持与下拉框一致的内边距 */
    color: white; /* 统一文本颜色 */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center; /* 居中内容 */
    gap: 8px;
    transition: all 0.3s ease; /* 统一过渡速度 */
    width: 120px; /* 统一宽度 */
    height: 45px; /* 统一高度 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 统一阴影 */
    white-space: nowrap; /* 防止文本换行 */
}

    .mode-toggle-btn:hover {
        background: rgba(25, 118, 210, 0.3); /* 统一 hover 背景 */
        border-color: #4dccbd; /* 统一 hover 边框颜色 */
    }

    .mode-toggle-btn i {
        font-size: 1.2rem;
        color: white; /* 确保图标颜色与文本一致 */
        transition: color 0.3s ease;
    }

    /* 激活状态下的图标颜色 (假设通过 is-active 类控制) */
    .mode-toggle-btn.is-active i {
        color: #4dccbd; /* 激活时的突出颜色 */
    }

/* 响应式调整 */
@media (max-width: 768px) {
    .search-controls {
        padding: 0 15px;
    }

    .filter-controls {
        flex-direction: column;
    }

        .filter-controls select,
        .refresh-btn {
            width: 100%;
        }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.confirm-modal {
    background: rgba(20, 30, 60, 0.95);
    border-radius: 12px;
    width: 450px;
    max-width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(220, 53, 69, 0.5);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    background: rgba(220, 53, 69, 0.2);
    border-bottom: 1px solid rgba(220, 53, 69, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        color: white;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .modal-header i {
        color: #ff6b6b;
    }

.close-modal {
    background: transparent;
    border: none;
    color: #bbdefb;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

    .close-modal:hover {
        color: white;
        transform: rotate(90deg);
    }

.modal-body {
    padding: 20px;
    color: #bbdefb;
    line-height: 1.6;
}

.modal-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-btn, .confirm-btn {
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.cancel-btn {
    background: rgba(20, 30, 60, 0.7);
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #bbdefb;
}

    .cancel-btn:hover {
        background: rgba(30, 40, 70, 0.8);
    }

.confirm-btn.danger {
    background: rgba(220, 53, 69, 0.7);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: white;
}

    .confirm-btn.danger:hover:not(:disabled) {
        background: rgba(220, 53, 69, 0.8);
    }

.confirm-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 通知提示样式 */
.notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: notificationSlideIn 0.3s ease-out;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.notification.success {
    background: rgba(40, 167, 69, 0.9);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.notification.error {
    background: rgba(220, 53, 69, 0.9);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.close-notification {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 15px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

    .close-notification:hover {
        opacity: 1;
    }

/* 删除动画 */
.history-item.leaving {
    animation: itemFadeOut 0.3s ease-out forwards;
}

@keyframes itemFadeOut {
    to {
        opacity: 0;
        height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 0;
        transform: translateX(100px);
    }
}

/* 识别结果页面样式 */
.recognition-page {
    /* 移除 max-width、margin、background、backdrop-filter、border-radius、overflow、box-shadow、border 等重复样式 */
    /* 只保留内容布局相关样式 */
}

.recognition-container {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 600px;
}

/* 新增：识别结果页面左侧面板样式 */
.recognition-left-panel {
    display: flex;
    flex-direction: column;
    width: 3000px; /* 固定左侧面板宽度 */
    background: rgba(0, 10, 30, 0.7); /* 略深一点的背景色 */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px; /* 左侧面板的内边距 */
    gap: 10px; /* 搜索/筛选区域和文件夹区域之间的间距 */
}

.recognition-content {
    display: flex;
    width: 1000vh;
    height: 100%;
    min-height: 500px;
    overflow-y: auto;
}

.recognition-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: rgba(10, 15, 35, 0.6);
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
}

.recognition-item {
    background: rgba(20, 30, 60, 0.5);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 120px;
}

.result-preview {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.result-image {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

    .result-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
        display: block;
    }

.result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

.result-title {
    font-weight: bold;
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-description {
    display: none;
}

.result-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #bbdefb;
    margin-top: 4px;
    gap: 0;
}

    .result-meta .timestamp {
        font-size: 1rem;
        color: #bbdefb;
        text-align: center;
        margin: 0;
        padding: 0;
    }

.result-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    flex-direction: column; /* 将方向改为垂直 */
    gap: 8px; /* 增加垂直间距 */
}

.view-btn:hover {
    color: #4dccbd;
}

.export-btn:hover {
    color: #ffc107;
}

.delete-btn:hover {
    color: #ff6b6b;
}

.result-detail {
    background: rgba(10, 15, 35, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 181, 246, 0.5) transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}

.result-date {
    color: #bbdefb;
    font-size: 1.1rem;
    margin-right: auto;
    margin-left: 10px;
}

.result-image-large {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

    .result-image-large img {
        max-width: 100%;
        max-height: 300px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

.result-description-full {
    background: rgba(20, 30, 60, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
}

    .result-description-full h4 {
        color: #4fc3f7;
        margin-bottom: 15px;
        font-size: 1.2rem;
        text-align: left;
    }

    .result-description-full p {
        color: #bbdefb;
        line-height: 1.6;
        margin: 0;
    }

.detail-actions {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    border-top: none;
    width: 100%;
    justify-content: flex-end;
}

    .detail-actions .action-btn {
        border-radius: 25px;
        padding: 10px 18px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 1rem;
    }

/* 新增开关按钮样式 */
.switch-area {
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 28px;
    transition: .4s;
}

.switch input:checked + .slider {
    background: #2196F3;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: .4s;
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.file-upload-left {
    margin-right: 12px;
    display: flex;
    align-items: center;
}

.input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    width: 100%;
    background: none;
}

.switch-area.switch-area-row {
    margin: 10px 0 0 0;
    padding-left: 10px;
}
/* 左侧栏滑动开关样式 */
.switch-area-side {
    margin-bottom: 18px;
}

.image-name-list-side {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
    max-height: 650px; /* 设置最大高度 */
    overflow-y: auto; /* 当内容超出时显示垂直滚动条 */
}

.image-name-card-side {
    display: flex;
    align-items: center;
    background: #c94a4a;
    border-radius: 16px;
    padding: 4px 16px 4px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
    color: #fff;
    font-size: 1rem;
    position: relative;
    transition: background 0.2s;
}

.image-name-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.remove-image-btn-name {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 2px;
    transition: color 0.2s;
}

    .remove-image-btn-name:hover {
        color: #ffb3b3;
    }

.image-tag-input {
    width: 100%;
    margin: 18px 0 0 0;
    padding: 10px 14px;
    border-radius: 14px;
    border: none;
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-size: 1.3rem;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}

    .image-tag-input::placeholder {
        color: #bbdefb;
        opacity: 0.8;
    }

    .image-tag-input:focus {
        background: rgba(255,255,255,0.18);
        box-shadow: 0 4px 12px rgba(33,150,243,0.10);
    }

/* 图片标签分类文件夹样式 */
.folder-category-box {
    margin-top: 0; /* 父级已经有gap来控制间距 */
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    /* max-height: 250px; 移除最大高度限制 */
    flex: 1; /* 填充剩余垂直空间 */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.folder-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

    .folder-item:hover {
        background: rgba(255, 255, 255, 0.15);
    }

    .folder-item.active {
        background: #2196F3;
        box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
    }

    .folder-item i {
        margin-right: 10px;
        font-size: 1.2rem;
    }

    .folder-item span {
        font-size: 0.95rem;
    }

/*    跳转识别结果按钮样式*/
.jump-button-container {
    margin-top: 15px;
    text-align: center;
    padding: 10px;
}

    .jump-button-container button {
        background: linear-gradient(135deg, #4dccbd, #00c6ff);
        color: white;
        border: none;
        border-radius: 25px;
        padding: 12px 24px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 500;
        font-size: 1.1rem;
        box-shadow: 0 4px 10px rgba(0, 198, 255, 0.4);
    }

        .jump-button-container button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(0, 198, 255, 0.6);
        }

        .jump-button-container button i {
            font-size: 1.2rem;
        }

/* 新增的单选按钮样式 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #bbdefb;
    font-size: 1rem;
}

    .radio-label input[type="radio"] {
        display: none; /* 隐藏原生单选按钮 */
    }

.radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(100, 181, 246, 0.5);
    background-color: rgba(20, 30, 60, 0.7);
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    background-color: #4dccbd; /* 选中后的背景色 */
    border-color: #4dccbd;
    box-shadow: 0 0 0 4px rgba(77, 204, 189, 0.3);
}

    .radio-label input[type="radio"]:checked + .radio-custom::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background-color: white; /* 选中后的圆点颜色 */
    }

.radio-label:hover .radio-custom {
    border-color: #4fc3f7;
}

.downloadExcel {
    /* 尺寸 */
    width: 90%; /* 固定宽度（或改用百分比+最大宽度） */
    height: 35px; /* 合适的高度 */
    padding: 0 16px; /* 左右内边距 */
    /* 布局 */
    display: flex; /* 启用 Flexbox */
    justify-content: center; /* 水平居中内容 */
    align-items: center; /* 垂直居中内容 */
    margin: 0 auto; /* 水平居中按钮本身 */
    /* 样式 */
    background-color: #4CAF50; /* 绿色背景 */
    color: white; /* 白色文字 */
    border: none; /* 无边框 */
    border-radius: 6px; /* 圆角 */
    font-size: 14px; /* 字体大小 */
    font-weight: 500; /* 中等粗细 */
    cursor: pointer; /* 手型光标 */
    /* 交互效果 */
    transition: background-color 0.3s;
}

    .downloadExcel:hover {
        background-color: #45a049; /* 悬停时深绿色 */
    }

    .downloadExcel:active {
        transform: scale(0.98); /* 点击时轻微缩小 */
    }

/* 数据报告页面样式 */
.reports-page {
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.report-type-selector {
    margin-bottom: 30px;
}

.type-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.type-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .type-tab:hover {
        color: #007bff;
    }

    .type-tab.active {
        color: #007bff;
        border-bottom-color: #007bff;
        font-weight: 600;
    }

.report-config {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.config-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.config-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.config-item {
    flex: 1;
    min-width: 200px;
}

    .config-item label {
        display: block;
        margin-bottom: 8px;
        font-weight: 500;
        color: #555;
    }

    .config-item input,
    .config-item select {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        transition: border-color 0.3s ease;
    }

        .config-item input:focus,
        .config-item select:focus {
            outline: none;
            border-color: #007bff;
            box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
        }

.config-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.generate-btn,
.export-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-btn {
    background: #007bff;
    color: white;
}

    .generate-btn:hover:not(:disabled) {
        background: #0056b3;
        transform: translateY(-1px);
    }

    .generate-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

.export-btn {
    background: #28a745;
    color: white;
}

    .export-btn:hover:not(:disabled) {
        background: #1e7e34;
        transform: translateY(-1px);
    }

    .export-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* 报告展示区域 */
.report-display {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.report-summary {
    margin-bottom: 30px;
}

    .report-summary h3 {
        margin: 0 0 20px 0;
        color: #333;
        font-size: 20px;
    }

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.summary-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

    .summary-card:hover {
        transform: translateY(-2px);
    }

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

    .card-icon.warning {
        background: #ffc107;
    }

    .card-icon.success {
        background: #28a745;
    }

.card-content {
    flex: 1;
}

.card-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.card-label {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 图表区域 */
.report-charts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.chart-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

    .chart-section h4 {
        margin: 0 0 20px 0;
        color: #333;
        font-size: 18px;
    }

/* 时间序列图表 */
.time-series-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.time-point {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #007bff;
}

.time-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.time-data {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.data-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.data-label {
    font-size: 14px;
    color: #666;
}

.data-value {
    font-weight: 600;
    color: #333;
}

    .data-value.warning {
        color: #ffc107;
    }

    .data-value.success {
        color: #28a745;
    }

/* 分布图表 */
.distribution-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.vertical-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  border-bottom: 2px solid #ddd;
  padding-bottom: 10px;
}

.bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  width: 50px;
  position: relative;
}

.distribution-chart h5 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
  font-size: 12px;
  color: #555;
  margin-bottom: 5px;
  text-align: center;
  height: 30px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  line-height: 1.2;
}

.bar-container {
  width: 30px;
  height: 100%;
  background: #e9ecef;
  border-radius: 4px 4px 0 0;
  position: relative;
  display: flex;
  align-items: flex-end;
}


.bar-fill {
  width: 100%;
  background: linear-gradient(to top, #007bff, #0056b3);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: height 0.5s ease;
  display: flex;
  justify-content: center;
}

.bar-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

/* 对比分析报告 */
.comparison-periods {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.period-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.period-label {
    font-weight: 600;
    color: #555;
}

.period-value {
    color: #333;
}

.comparison-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e0e0e0;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.metric-name {
    font-weight: 600;
    color: #333;
}

.metric-change {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
}

    .metric-change.positive {
        background: #d4edda;
        color: #155724;
    }

    .metric-change.negative {
        background: #f8d7da;
        color: #721c24;
    }

    .metric-change.neutral {
        background: #e2e3e5;
        color: #383d41;
    }

.metric-values {
    display: flex;
    justify-content: space-between;
}

.current-value,
.previous-value {
    text-align: center;
}

.value-label {
  position: absolute;
  top: -25px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  width: 100%;
  text-align: center;
}

.value-number {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 悬停效果 */
.bar-wrapper:hover .bar-fill {
  background: linear-gradient(to top, #33a6ff, #0077e6);
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.bar-wrapper:hover .bar-label {
  font-weight: bold;
  color: #007bff;
}

/* 对比表格 */
.comparison-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.header-cell {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid #e0e0e0;
}

    .table-row:last-child {
        border-bottom: none;
    }

.table-cell {
    padding: 15px;
    display: flex;
    align-items: center;
}

    .table-cell.positive {
        color: #155724;
        font-weight: 600;
    }

    .table-cell.negative {
        color: #721c24;
        font-weight: 600;
    }

    .table-cell.neutral {
        color: #383d41;
    }

/* 加载状态 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

    .empty-state i {
        font-size: 48px;
        margin-bottom: 20px;
        color: #ccc;
    }

/* 响应式设计 */
@media (max-width: 768px) {
    .config-row {
        flex-direction: column;
    }

    .config-item {
        min-width: auto;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    .distribution-charts {
        grid-template-columns: 1fr;
    }

    .comparison-metrics {
        grid-template-columns: 1fr;
    }

    .comparison-periods {
        flex-direction: column;
        gap: 10px;
    }

    .time-data {
        flex-direction: column;
        gap: 10px;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .header-cell,
    .table-cell {
        padding: 10px;
        border-bottom: 1px solid #e0e0e0;
    }
}